#ifndef __CARD_APP_H
#define __CARD_APP_H

#include "stm32f10x.h"

typedef struct
{
	uint16_t start_x;
	uint16_t start_y;
	uint16_t end_x;
	uint16_t end_y;
}CARD_StartBitmapTypeData;

typedef struct
{
	uint16_t data_count;
	uint16_t data[];
}CARD_SequelBitmapTypeData;

typedef struct
{
	uint8_t addr;
	uint8_t type;
	uint8_t data[];
}CARD_TypeProtocol;

typedef struct
{
	uint8_t num_of_leds;
	uint8_t state;
}CARD_LedsState;

typedef struct
{
	uint16_t buff_size;
	uint8_t state;
	uint8_t data[];
}CARD_JpegTypeData;

#define CARD_ADDR 							0x00 /* address usb card */
#define CARD_START_BITMAP_TYPE_DATA			0x01
#define CARD_SEQUEL_BITMAP_TYPE_DATA		0x02
#define CARD_LEDS_STATE_TYPE_DATA			0x03
#define CARD_JPEG_TYPE_DATA					0x04

#define CARD_LED_NUM						0x01

#define CARD_JPEG_STATE_START_PICTURE		0x00
#define CARD_JPEG_STATE_BREAK_PICTURE		0x01
#define CARD_JPEG_STATE_END_PICTURE			0x02

void USB_APP_Init(void);
#endif /* __CARD_APP_H */
